This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
transfer hook: add new onchain helper #6111
Merged
buffalojoec
merged 3 commits into
master
from
01-10-transfer_hook_add_new_onchain_helper
Jan 11, 2024
Merged
transfer hook: add new onchain helper #6111
buffalojoec
merged 3 commits into
master
from
01-10-transfer_hook_add_new_onchain_helper
Jan 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 10, 2024
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
buffalojoec
changed the base branch from
01-10-token_js_create_new_offchain_helper
to
01-10-token_2022_test_refactor_transfer_hook_test_to_use_new_offchain_helper
January 10, 2024 22:04
buffalojoec
force-pushed
the
01-10-transfer_hook_add_new_onchain_helper
branch
from
January 10, 2024 22:04
e80383e
to
26ed6f5
Compare
buffalojoec
force-pushed
the
01-10-transfer_hook_add_new_onchain_helper
branch
2 times, most recently
from
January 10, 2024 23:25
1b717ce
to
dfb7feb
Compare
joncinque
reviewed
Jan 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a question on the interface for the function
joncinque
previously approved these changes
Jan 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rolling right along, looks great!
buffalojoec
force-pushed
the
01-10-token_2022_test_refactor_transfer_hook_test_to_use_new_offchain_helper
branch
from
January 11, 2024 16:36
0b076b1
to
269ff6f
Compare
buffalojoec
force-pushed
the
01-10-transfer_hook_add_new_onchain_helper
branch
from
January 11, 2024 16:37
e6238ed
to
b1c626e
Compare
Merge activity
|
buffalojoec
force-pushed
the
01-10-token_2022_test_refactor_transfer_hook_test_to_use_new_offchain_helper
branch
from
January 11, 2024 21:18
269ff6f
to
63e8f91
Compare
Base automatically changed from
01-10-token_2022_test_refactor_transfer_hook_test_to_use_new_offchain_helper
to
master
January 11, 2024 21:20
buffalojoec
force-pushed
the
01-10-transfer_hook_add_new_onchain_helper
branch
from
January 11, 2024 21:20
b1c626e
to
667b867
Compare
mergify
bot
dismissed
joncinque’s stale review
January 11, 2024 21:22
Pull request has been modified.
buffalojoec
pushed a commit
that referenced
this pull request
Jan 11, 2024
Continuing on from the new helper introduced in #6111. Here the onchain helper in Token2022 is updated to use the non-deprecated new onchain helper from SPL Transfer Hook interface. PDAs as extra meta configs are also added to the transfer hook test in `program-2022-test` for additional assurance.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As another step for solving #6064, the onchain helpers now need to be
replaced. This PR makes that change in the SPL Transfer Hook interface.
Specifically, this commit adds a new
add_extra_accounts_for_execute_cpi(..)
helper and deprecates the old one.
Like its offchain counterpart, this new helper requires the arguments for
instruction::execute(..)
in order to validate that a properExecuteInstruction
is being resolved, thus ensuring proper account resolution.This function, like its now-deprecated sibling, is designed specifically to add
extra accounts to an
ExecuteInstruction
CPI instruction. It's expected thatthe instruction being provided is a CPI instruction for another program, and
that program will CPI to the transfer hook program in question. Details about
this have been added to the helper's documentation.